import * as request from "@/utils/request";

//获取角色列表
export function getRoleList(data: any) {
    return request.get('/role/list')
}

//授权角色
export function grantRole(data: any) {
    return request.post('/user/role/grant/' + data.id, data.checkedRoles)
}
//获取角色分页数据
export function getRolePage(data: any) {
    return request.post('/role/list/page', data)
}
//删除或批量删除角色
export function deleteRole(data:any){
    return request.post('/role/delete',data)
}
//根据id获取Role信息
export function getRoleById(data:any){
    return request.get('/role/'+data)
}
//保存角色
export function saveRole(data:any){
    return request.post('/role/save',data)
}